﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WFcontrol
{
    public partial class Frm_browns : Form
    {
        public Frm_browns()
        {
            InitializeComponent();
        }

        private void webBrowser1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {

        }

        private void toolStripTextBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                webBrowser1.Navigate(toolStripTextBox1.Text);
                progressBar1.PerformStep();
                label1.Text = progressBar1.Value.ToString() + "%";
            }
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            if (toolStripTextBox1.Text.Length >0)
                webBrowser1.Navigate(toolStripTextBox1.Text);
            else MessageBox.Show("Text textbox please");
            progressBar1.Minimum = 1;
            progressBar1.Maximum = 2000;
            progressBar1.Value = 1;
            progressBar1.Step = 3;
            for (int i = 1; i <= 2000; i++)
            {
                progressBar1.PerformStep();
                label1.Text = progressBar1.Value.ToString() + "%";
               
                label1.Visible = false;
            } progressBar1.Visible = false;
                //progressBar1.
            //label1.Text = n

        }



       
    }
}
